package com.caigou.mapper.cms;

import com.caigou.bean.cms.entity.ArticleStatistics;
import com.caigou.bean.cms.entity.ArticleStatisticsDay;
import com.caigou.bean.cms.param.FontArticlePram;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

//@Mapper
//@Repository("ArticleStatisticsMapper")
public interface ArticleStatisticsMapper {
    int loadIsUV(@Param("articleId") String articleId, @Param("ip") String ip);

    void saveArticleClickCount(ArticleStatistics articleStatistics);

    ArticleStatistics selectByPrimaryKey(Integer id);

    List<ArticleStatistics> findArticleStatisticsByArticleId(FontArticlePram pram);

    int deleteArticleStatisticsByArticleId(@Param("articleId") String articleId);

    List<ArticleStatisticsDay> queryArticleStatisticsDayByTime(@Param("startTime")Date startTime, @Param("endTime") Date endTime, @Param("limit")int limit);

    int deleteArticleStatisticsByTime(@Param("historyTime")Date historyTime);
}
